<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: ContactSpringDamper&lt; T &gt; Class Template Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d0/df2/class_contact_spring_damper.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="../../d6/d2f/class_contact_spring_damper-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ContactSpringDamper&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Inheritance diagram for ContactSpringDamper&lt; T &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d8/df6/class_contact_spring_damper__inherit__graph.png" border="0" usemap="#_contact_spring_damper_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="_contact_spring_damper_3_01_t_01_4_inherit__map" id="_contact_spring_damper_3_01_t_01_4_inherit__map">
</map>
</div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for ContactSpringDamper&lt; T &gt;:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d8/d52/class_contact_spring_damper__coll__graph.png" border="0" usemap="#_contact_spring_damper_3_01_t_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="_contact_spring_damper_3_01_t_01_4_coll__map" id="_contact_spring_damper_3_01_t_01_4_coll__map">
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a82554c4327792e1ec4003ab95d94a646"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#a82554c4327792e1ec4003ab95d94a646">ContactSpringDamper</a> (<a class="el" href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel</a>&lt; T &gt; *model)</td></tr>
<tr class="separator:a82554c4327792e1ec4003ab95d94a646"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8eeeea2bccd1b2162c640f64c402c1f"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#ae8eeeea2bccd1b2162c640f64c402c1f">~ContactSpringDamper</a> ()</td></tr>
<tr class="separator:ae8eeeea2bccd1b2162c640f64c402c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad45f7a50bdf2c368053a4686a7f209e0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#ad45f7a50bdf2c368053a4686a7f209e0">UpdateExternalForces</a> (T K, T D, T dt)</td></tr>
<tr class="separator:ad45f7a50bdf2c368053a4686a7f209e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0713774594a56c8a88c092dc768913f0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#a0713774594a56c8a88c092dc768913f0">UpdateQdot</a> (<a class="el" href="../../de/d75/struct_f_b_model_state.html">FBModelState</a>&lt; T &gt; &amp;state)</td></tr>
<tr class="separator:a0713774594a56c8a88c092dc768913f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_contact_constraint"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_contact_constraint')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint&lt; T &gt;</a></td></tr>
<tr class="memitem:ad8522d960d6669a66de9d1e5ffe6d8a2 inherit pub_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ad8522d960d6669a66de9d1e5ffe6d8a2">ContactConstraint</a> (<a class="el" href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel</a>&lt; T &gt; *model)</td></tr>
<tr class="separator:ad8522d960d6669a66de9d1e5ffe6d8a2 inherit pub_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae795ddbfbd28d87f6e0dfb9e9f8ef838 inherit pub_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ae795ddbfbd28d87f6e0dfb9e9f8ef838">~ContactConstraint</a> ()</td></tr>
<tr class="separator:ae795ddbfbd28d87f6e0dfb9e9f8ef838 inherit pub_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ac93d67428573f388f0a349502eb63f inherit pub_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a8ac93d67428573f388f0a349502eb63f">AddCollision</a> (<a class="el" href="../../df/dc6/class_collision.html">Collision</a>&lt; T &gt; *collision)</td></tr>
<tr class="separator:a8ac93d67428573f388f0a349502eb63f inherit pub_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a96c50ca8f3f2128d753fe2fc26e21c inherit pub_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a>&lt; T &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a7a96c50ca8f3f2128d753fe2fc26e21c">getContactPosList</a> ()</td></tr>
<tr class="separator:a7a96c50ca8f3f2128d753fe2fc26e21c inherit pub_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17a5cecdbd67cf1fed3fa0272c0522eb inherit pub_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a>&lt; T &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a17a5cecdbd67cf1fed3fa0272c0522eb">getGCForce</a> (size_t idx)</td></tr>
<tr class="separator:a17a5cecdbd67cf1fed3fa0272c0522eb inherit pub_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:acec7f25a63187c2559597c916db86144"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#acec7f25a63187c2559597c916db86144">_groundContactWithOffset</a> (T K, T D)</td></tr>
<tr class="separator:acec7f25a63187c2559597c916db86144"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_contact_constraint"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_contact_constraint')"><img src="../../closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint&lt; T &gt;</a></td></tr>
<tr class="memitem:ab5d51a50a75c85c530968b2d07b538fe inherit pro_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ab5d51a50a75c85c530968b2d07b538fe">_groundContactWithOffset</a> (T K, T D)</td></tr>
<tr class="separator:ab5d51a50a75c85c530968b2d07b538fe inherit pro_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab571431122630a97f79c2b111ad170bb inherit pro_methods_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ab571431122630a97f79c2b111ad170bb">_CheckContact</a> ()</td></tr>
<tr class="separator:ab571431122630a97f79c2b111ad170bb inherit pro_methods_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a70230597d37f3446c68c6adc729025e0"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a></td></tr>
<tr class="separator:a70230597d37f3446c68c6adc729025e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aa082d54c07c3a9b70365755a7d02d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a></td></tr>
<tr class="separator:a7aa082d54c07c3a9b70365755a7d02d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac395f87c687c6284b68116cac098e685"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a></td></tr>
<tr class="separator:ac395f87c687c6284b68116cac098e685"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_contact_constraint"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_contact_constraint')"><img src="../../closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint&lt; T &gt;</a></td></tr>
<tr class="memitem:a62c13bcf46c4c8bcb57bef2922130c68 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a62c13bcf46c4c8bcb57bef2922130c68">deflectionRate</a></td></tr>
<tr class="separator:a62c13bcf46c4c8bcb57bef2922130c68 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af87f3e8c0999e70bd1539c06df1861d0 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#af87f3e8c0999e70bd1539c06df1861d0">_tangentialDeflections</a></td></tr>
<tr class="separator:af87f3e8c0999e70bd1539c06df1861d0 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06400ae9c1cbe246b8d5c048a22e3f58 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a06400ae9c1cbe246b8d5c048a22e3f58">_nContact</a></td></tr>
<tr class="separator:a06400ae9c1cbe246b8d5c048a22e3f58 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64b3671da5a4c056dc83cac9580abefd inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a64b3671da5a4c056dc83cac9580abefd">_nCollision</a></td></tr>
<tr class="separator:a64b3671da5a4c056dc83cac9580abefd inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1960c9e63fdef6b115a00f812a33d8ab inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel</a>&lt; T &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a1960c9e63fdef6b115a00f812a33d8ab">_model</a></td></tr>
<tr class="separator:a1960c9e63fdef6b115a00f812a33d8ab inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6adad1db7d60e53899d1400ac687df1d inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="../../df/dc6/class_collision.html">Collision</a>&lt; T &gt; * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a6adad1db7d60e53899d1400ac687df1d">_collision_list</a></td></tr>
<tr class="separator:a6adad1db7d60e53899d1400ac687df1d inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9b81b0055f2160f7ea36b2b67b21020 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">std::vector&lt; size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ab9b81b0055f2160f7ea36b2b67b21020">_idx_list</a></td></tr>
<tr class="separator:ab9b81b0055f2160f7ea36b2b67b21020 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a119224ec741efa7a40b69913f3ef361a inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">std::vector&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a119224ec741efa7a40b69913f3ef361a">_cp_resti_list</a></td></tr>
<tr class="separator:a119224ec741efa7a40b69913f3ef361a inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54c3df629004fa58dc718cd93d2cfdd1 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">std::vector&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a54c3df629004fa58dc718cd93d2cfdd1">_cp_mu_list</a></td></tr>
<tr class="separator:a54c3df629004fa58dc718cd93d2cfdd1 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2595236561f67287ca6d75a8ce5757a0 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top">std::vector&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a2595236561f67287ca6d75a8ce5757a0">_cp_penetration_list</a></td></tr>
<tr class="separator:a2595236561f67287ca6d75a8ce5757a0 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61e12845deb086ef378239f7220abd16 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a61e12845deb086ef378239f7220abd16">_cp_force_list</a></td></tr>
<tr class="separator:a61e12845deb086ef378239f7220abd16 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d73c11418c9857fce9b14c4303f1139 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#a1d73c11418c9857fce9b14c4303f1139">_cp_local_force_list</a></td></tr>
<tr class="separator:a1d73c11418c9857fce9b14c4303f1139 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcb49c92ac2393dd785a59048f009877 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#afcb49c92ac2393dd785a59048f009877">_cp_pos_list</a></td></tr>
<tr class="separator:afcb49c92ac2393dd785a59048f009877 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9247eb5e4008dc4298929e7fcac8d32 inherit pro_attribs_class_contact_constraint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt; <a class="el" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a>&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d6c/class_contact_constraint.html#ab9247eb5e4008dc4298929e7fcac8d32">_cp_frame_list</a></td></tr>
<tr class="separator:ab9247eb5e4008dc4298929e7fcac8d32 inherit pro_attribs_class_contact_constraint"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class ContactSpringDamper&lt; T &gt;</h3>


<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00012">12</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a82554c4327792e1ec4003ab95d94a646"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::<a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d6/db1/class_floating_base_model.html">FloatingBaseModel</a>&lt; T &gt; *&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00014">14</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>

<p>References <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00041">ContactSpringDamper&lt; T &gt;::_nGC</a>, <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">ContactSpringDamper&lt; T &gt;::_tangentialDeflections</a>, and <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">ContactSpringDamper&lt; T &gt;::deflectionRate</a>.</p>
<div class="fragment"><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      : <a class="code" href="../../d7/d6c/class_contact_constraint.html">ContactConstraint&lt;T&gt;</a>(model) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a> = CC::_model-&gt;_nGroundContact;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a>; ++i) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;      <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>.push_back(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2&lt;T&gt;::Zero</a>());</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>.resize(_nGC);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  }</div><div class="ttc" id="class_contact_spring_damper_html_a70230597d37f3446c68c6adc729025e0"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">ContactSpringDamper::_nGC</a></div><div class="ttdeci">size_t _nGC</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00041">ContactSpringDamper.h:41</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3ed2d7a1fdebc191497c0cc0ab0a870b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 2, 1 &gt; Vec2</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00022">cppTypes.h:22</a></div></div>
<div class="ttc" id="class_contact_constraint_html"><div class="ttname"><a href="../../d7/d6c/class_contact_constraint.html">ContactConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d79/_contact_constraint_8h_source.html#l00020">ContactConstraint.h:20</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a7aa082d54c07c3a9b70365755a7d02d6"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">ContactSpringDamper::deflectionRate</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; deflectionRate</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">ContactSpringDamper.h:49</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_ac395f87c687c6284b68116cac098e685"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">ContactSpringDamper::_tangentialDeflections</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; _tangentialDeflections</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">ContactSpringDamper.h:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae8eeeea2bccd1b2162c640f64c402c1f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::~<a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00023">23</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>

<p>References <a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00013">ContactSpringDamper&lt; T &gt;::UpdateExternalForces()</a>.</p>
<div class="fragment"><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;{}</div></div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/df2/class_contact_spring_damper_ae8eeeea2bccd1b2162c640f64c402c1f_cgraph.png" border="0" usemap="#d0/df2/class_contact_spring_damper_ae8eeeea2bccd1b2162c640f64c402c1f_cgraph" alt=""/></div>
<map name="d0/df2/class_contact_spring_damper_ae8eeeea2bccd1b2162c640f64c402c1f_cgraph" id="d0/df2/class_contact_spring_damper_ae8eeeea2bccd1b2162c640f64c402c1f_cgraph">
</map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="acec7f25a63187c2559597c916db86144"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::_groundContactWithOffset </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>D</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">K</td><td>Ground stiffness </td></tr>
    <tr><td class="paramname">D</td><td>Ground damping</td></tr>
  </table>
  </dd>
</dl>
<p>subfunction computing contact forces </p>

<p>Definition at line <a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00042">42</a> of file <a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html">ContactSpringDamper.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                                                              {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; CC::_nContact; i++) {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;T&gt;</a> v =</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        CC::_cp_frame_list[i].transpose() *</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        CC::_model-&gt;_vGC[CC::_idx_list[i]];  <span class="comment">// velocity in plane coordinates</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    T z = CC::_cp_penetration_list[i];       <span class="comment">// the penetration into the ground</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    T zd = v[2];                             <span class="comment">// the penetration velocity</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    T zr = std::sqrt(std::max(T(0), -z));  <span class="comment">// sqrt penetration into the ground,</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                                           <span class="comment">// or zero if we aren&#39;t penetrating</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    T normalForce =</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        zr *</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        (-K * z - D * zd);  <span class="comment">// normal force is spring-damper * sqrt(penetration)</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="comment">// set output force to zero for now.</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    CC::_cp_local_force_list[i][0] = 0;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    CC::_cp_local_force_list[i][1] = 0;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    CC::_cp_local_force_list[i][2] = 0;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">if</span> (normalForce &gt; 0) {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;      CC::_cp_local_force_list[i][2] =</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;          normalForce;  <span class="comment">// set the normal force. This is in the plane&#39;s</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                        <span class="comment">// coordinates for now</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;      <span class="comment">// first, assume sticking</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;      <span class="comment">// this means the tangential deformation happens at the speed of the foot.</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;      <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>[CC::_idx_list[i]] = v.template topLeftCorner&lt;2, 1&gt;();</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2&lt;T&gt;</a> tangentialSpringForce =</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;          K * zr *</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;          <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>[CC::_idx_list[i]];  <span class="comment">// tangential force due to</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                                                     <span class="comment">// &quot;spring&quot;</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2&lt;T&gt;</a> tangentialForce =</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;          -tangentialSpringForce -</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;          D * zr * <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>[CC::_idx_list[i]];  <span class="comment">// add damping to get</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                                                      <span class="comment">// total tangential</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;      <span class="comment">// check for slipping:</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      T slipForce = CC::_cp_mu_list[i] *</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                    normalForce;  <span class="comment">// maximum force magnitude without slipping</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;      T tangentialForceMagnitude =</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;          tangentialForce</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;              .norm();  <span class="comment">// actual force magnitude if we assume sticking</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      T r = tangentialForceMagnitude / slipForce;  <span class="comment">// ratio of force/max_force</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      <span class="keywordflow">if</span> (r &gt; 1) {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="comment">// we are slipping.</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        tangentialForce =</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            tangentialForce / r;  <span class="comment">// adjust tangential force to avoid slipping</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>[CC::_idx_list[i]] =</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            -(tangentialForce + tangentialSpringForce) / (D * zr);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      <span class="comment">// set forces</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      CC::_cp_local_force_list[i][0] = tangentialForce[0];</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      CC::_cp_local_force_list[i][1] = tangentialForce[1];</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="comment">// move back into robot frame</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    CC::_cp_force_list[CC::_idx_list[i]] =</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        CC::_cp_frame_list[i] * CC::_cp_local_force_list[i];</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div><div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3ed2d7a1fdebc191497c0cc0ab0a870b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 2, 1 &gt; Vec2</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00022">cppTypes.h:22</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a7aa082d54c07c3a9b70365755a7d02d6"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">ContactSpringDamper::deflectionRate</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; deflectionRate</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">ContactSpringDamper.h:49</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_ac395f87c687c6284b68116cac098e685"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">ContactSpringDamper::_tangentialDeflections</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; _tangentialDeflections</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">ContactSpringDamper.h:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad45f7a50bdf2c368053a4686a7f209e0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::UpdateExternalForces </td>
          <td>(</td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>dt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Run the ground contact model for a single collision plane on a list of ground contact points The ground is allowed to deform in the tangential direction, but not the normal direction. The ground also "remembers" its deformation between separate contact events. (however it does spring back pretty quickly) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">K</td><td>Ground stiffness </td></tr>
    <tr><td class="paramname">D</td><td>Ground damping </td></tr>
    <tr><td class="paramname">dt</td><td>Timestep (used for deflection)</td></tr>
  </table>
  </dd>
</dl>
<p>compute contact forces coinciding to the contact and update external force in a dynamics model. </p>

<p>Implements <a class="el" href="../../d7/d6c/class_contact_constraint.html#a6b89e1a3aafb28f26a14a77d294fb062">ContactConstraint&lt; T &gt;</a>.</p>

<p>Definition at line <a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00013">13</a> of file <a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html">ContactSpringDamper.cpp</a>.</p>

<p>References <a class="el" href="../../d9/dc8/spatial_8h_source.html#l00348">spatial::forceToSpatialForce()</a>.</p>
<div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                                                                {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  CC::_nContact = CC::_CheckContact();</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a>; ++i) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="comment">// first assume there&#39;s no contact, so the ground &quot;springs back&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>[i] = (-K / D) * <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>[i];</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  }</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <span class="keywordflow">if</span> (CC::_nContact &gt; 0) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#acec7f25a63187c2559597c916db86144">_groundContactWithOffset</a>(K, D);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; CC::_nContact; ++i) {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;      CC::_model-&gt;_externalForces.at(CC::_model-&gt;_gcParent[CC::_idx_list[i]]) +=</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;          <a class="code" href="../../de/d1a/namespacespatial.html#a3b32f3f809891285d9f1a8cf3c7cd16e">forceToSpatialForce</a>(CC::_cp_force_list[CC::_idx_list[i]],</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;                              CC::_cp_pos_list[i]);</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">int</span> count(0);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    ++count;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">if</span> (count &gt; 5) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      <span class="comment">// exit(0);</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    }</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  }</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">_nGC</a>; ++i) {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">_tangentialDeflections</a>[i] += dt * <a class="code" href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">deflectionRate</a>[i];</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div><div class="ttc" id="namespacespatial_html_a3b32f3f809891285d9f1a8cf3c7cd16e"><div class="ttname"><a href="../../de/d1a/namespacespatial.html#a3b32f3f809891285d9f1a8cf3c7cd16e">spatial::forceToSpatialForce</a></div><div class="ttdeci">auto forceToSpatialForce(const Eigen::MatrixBase&lt; T &gt; &amp;f, const Eigen::MatrixBase&lt; T2 &gt; &amp;p)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dc8/spatial_8h_source.html#l00348">spatial.h:348</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a70230597d37f3446c68c6adc729025e0"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a70230597d37f3446c68c6adc729025e0">ContactSpringDamper::_nGC</a></div><div class="ttdeci">size_t _nGC</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00041">ContactSpringDamper.h:41</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_a7aa082d54c07c3a9b70365755a7d02d6"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#a7aa082d54c07c3a9b70365755a7d02d6">ContactSpringDamper::deflectionRate</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; deflectionRate</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">ContactSpringDamper.h:49</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_ac395f87c687c6284b68116cac098e685"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#ac395f87c687c6284b68116cac098e685">ContactSpringDamper::_tangentialDeflections</a></div><div class="ttdeci">vectorAligned&lt; Vec2&lt; T &gt; &gt; _tangentialDeflections</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">ContactSpringDamper.h:50</a></div></div>
<div class="ttc" id="class_contact_spring_damper_html_acec7f25a63187c2559597c916db86144"><div class="ttname"><a href="../../d0/df2/class_contact_spring_damper.html#acec7f25a63187c2559597c916db86144">ContactSpringDamper::_groundContactWithOffset</a></div><div class="ttdeci">void _groundContactWithOffset(T K, T D)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/da7/_contact_spring_damper_8cpp_source.html#l00042">ContactSpringDamper.cpp:42</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_cgraph.png" border="0" usemap="#d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_cgraph" alt=""/></div>
<map name="d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_cgraph" id="d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_icgraph.png" border="0" usemap="#d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_icgraph" alt=""/></div>
<map name="d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_icgraph" id="d0/df2/class_contact_spring_damper_ad45f7a50bdf2c368053a4686a7f209e0_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a0713774594a56c8a88c092dc768913f0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::UpdateQdot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../de/d75/struct_f_b_model_state.html">FBModelState</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Used for impulse based contact constraint method </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>: full state of a floating system full state </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>state : update velocity </dd></dl>

<p>Implements <a class="el" href="../../d7/d6c/class_contact_constraint.html#a16cbace2441dccfd4b0754fbf7a640f9">ContactConstraint&lt; T &gt;</a>.</p>

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00036">36</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                                                  {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    (void)state; <span class="comment">/* Do nothing */</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  }</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a70230597d37f3446c68c6adc729025e0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::_nGC</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00041">41</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac395f87c687c6284b68116cac098e685"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt;<a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt;T&gt; &gt; <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::_tangentialDeflections</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00050">50</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7aa082d54c07c3a9b70365755a7d02d6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d8e/cpp_types_8h.html#a078e1eaa8a3af13cef27a0a8d0c1302e">vectorAligned</a>&lt;<a class="el" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a>&lt;T&gt; &gt; <a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a>&lt; T &gt;::deflectionRate</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html#l00049">49</a> of file <a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="../../da/d04/_contact_spring_damper_8h_source.html">ContactSpringDamper.h</a></li>
<li><a class="el" href="../../d6/da7/_contact_spring_damper_8cpp_source.html">ContactSpringDamper.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d0/df2/class_contact_spring_damper.html">ContactSpringDamper</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
